package com.cn.sl.server.api.system.user.model.dto

import jakarta.validation.constraints.NotEmpty
import jakarta.validation.constraints.NotNull

class AdminUserAppendRoleParam(
    @field:NotEmpty(message = "用户id不能为空")
    var ids: List<Long>?,
    @NotNull(message = "角色不能为空")
    var roleIds: List<Long>?,
) {
    fun toDto(): AdminUserAppendRoleDto {
        return AdminUserAppendRoleDto(
            ids = ids!!,
            roleIds = roleIds!!
        )
    }
}

data class AdminUserAppendRoleDto(
    var ids: List<Long>,
    var roleIds: List<Long>
)